/******************************

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <iostream>
//for setw, precision()
#include <iomanip>
using namespace std;

class Vector
{
	int n;
	float *p;
public:
	Vector(){};
	Vector(int size){
		n = size;
		p = new float[n];
		for (int i = 0; i < n; i++)
		{
			p[i] = 0;
		}
	};
	int getN(){
		return n;
	}
	void nhap(){
		cout<<"\nNhap n:";
		cin>>n;
		p = new float[n];
		if(p == NULL)
		{
			cout << "\nERROR!";
			getch();
		}
		cout<<"\nNhap mang: ";
		for (int i = 0; i < n; i++)
		{
			cout<<"\nNhap pt["<<i<<"]";
			cin >> p[i];
		}
	}
	void in(){
		cout<<"\nHien thi";
		for (int i = 0; i < n; i++)
		{
			cout<<" "<<p[i];
		}
	}

	Vector tong(Vector v){
		Vector r(n);
		for (int i = 0; i < n; i++)
		{
			r.p[i] = p[i] + v.p[i];
		}
		return r;
	}
	float& operator [](int x){
		return p[x];
	}
	float * getValue(){
		return p;
	}
	friend ostream& operator << (ostream &os, Vector &p);

	friend istream &operator >>(istream &is, Vector &p);

	int operator ==(Vector v1){
		if (n != v1.n)
		{
			return 0;
		}
		for (int i = 0; i < n; i++)
		{
			if (p[i] != v1.getValue[i])
			{
				return 0;
			}
		}
		return 1;
	}
};
ostream& operator << (ostream &os, Vector &p){
	for(int i=0; i<p.getN();i++)
	{
		os <<"x = "<<p.getValue()[i]<<" ";
	}
	return os;

}
istream & operator>>(istream &is, Vector &a){
	cout<<"\nNhap vector: ";
	cout<<"\nNhap n: ";
	int n;
	cin>>n;
	a.n = n;
	a.p = new float[a.n];
	for (int i = 0; i < n; i++)
	{
		cout<<"\nNhap p["<<i+1<<"]";
		is>>a[i];
	}
	return is;
}


void main(){

	Vector v1, v2;
	cin>>v1;
	cout<<v1;
	v1.in();
	v2.nhap();
	v2.in();
	Vector v3(v1.getN());
	v3 = v1.tong(v2);
	v3.in();
	getch();
	
}

/**********************************/